#include "Animation.h"
#include <assert.h>

CAnimation::CAnimation(int indexSprite, int firstFrame, int lastFrame, int offsetTime):
						indexSprite(indexSprite), firstFrame(firstFrame), lastFrame(lastFrame), 
						currentFrame(firstFrame), offsetTime(offsetTime), timeBeginAnimation(0)
{
	//assert that test if the parameters got good value
	assert(indexSprite>=0);
	assert(firstFrame>0);
	assert(lastFrame>=firstFrame);
	assert(offsetTime>0);
}

CAnimation::~CAnimation(void){}

//gettor
int CAnimation::getIndexSprite(void)const
{
	return this->indexSprite;
}
int CAnimation::getFirstFrame(void)const
{
	return this->firstFrame;
}
int CAnimation::getLastFrame(void)const
{
	return this->lastFrame;
}
int CAnimation::getCurrentFrame(void)const
{
	return this->currentFrame;
}
int CAnimation::getOffsetTime(void)const
{
	return this->offsetTime;
}
int CAnimation::getTimeBeginAnimation(void)const
{
	return this->timeBeginAnimation;
}

//settor
void CAnimation::setIndexSprite(int indexSprite)
{
	this->indexSprite=indexSprite;
}
void CAnimation::setFirstFrame(int firstFrame)
{
	this->firstFrame=firstFrame;
}
void CAnimation::setLastFrame(int lastFrame)
{
	this->lastFrame=lastFrame;
}
void CAnimation::setCurrentFrame(int currentFrame)
{
	this->currentFrame=currentFrame;
}
void CAnimation::setOffsetTime(int offsetTime)
{
	this->offsetTime=offsetTime;
}
void CAnimation::setTimeBeginAnimation(int timeBeginAnimation)
{
	this->timeBeginAnimation=timeBeginAnimation;
}

